package br.com;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class Tela2Activity extends Activity{
	
	private Button ButtonTela2, ButtonTela3;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tela2);
        
        Bundle extras = getIntent().getExtras();
        String novoTexto = (String)extras.getString("param1");
        
        
        
        ButtonTela2 = (Button)findViewById(R.id.btnTela3);
        
        ButtonTela2.setText(novoTexto);
        
        ButtonTela3 = (Button)findViewById(R.id.btnTela4);
        
        String outrotexto = (String)extras.getString("param2");
        
        ButtonTela3.setText(outrotexto);
        
        ButtonTela2.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent itTela3 = new Intent(v.getContext(), Tela3Activity.class);
				itTela3.putExtra("parametro", "Exibindo parametro");
				startActivity(itTela3);
			}
		});
    }

}
